<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="<?php echo site_url("style.css"); ?>" type="text/css" />
<title><?php echo $pagetitle; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<body>
	<!-- header starts here -->
<div id="header">
  <div id="header-content"> 
    <ul>
      <li><a href="<?php echo site_url("admin/login/"); ?>">Login</a></li>
    </ul>
  </div>
</div>

<div id="content-wrap">
	
	<div id="nav">
		<img src="<?php echo site_url("images/Nav_Head_Post.png"); ?>" alt="navigation header" class="no-border" />
		<a href="<?php echo site_url("review"); ?>"><img src="<?php echo site_url("images/Home_Off.png"); ?>" alt="home" class="no-border" /></a>
		<a href="<?php echo site_url("review/reviews/default/0/A"); ?>"><img src="<?php echo site_url("images/Reviews_On.png"); ?>" alt="reviews" class="no-border" /></a>
		<img src="<?php echo site_url("images/Nav2b.png"); ?>" alt="nav3" class="no-border" />
	</div>
		
	<div id="main_display">	
		

<?php
		if (strcmp($article->class, 'Review') == 0) {	// Check to see if this is a review post because we need to do extra formatting
			
			$stitle = htmlspecialchars($series->name);
			$title = htmlspecialchars($article->title);
			$post = nl2br($article->content);
			echo "<div id=\"post\"><h1>$stitle - ";
				
				if ($article->episode == 0) {	// Check to see if its a series preview or an episode review
					echo"Preview";
				} else {
					if ($article->episode == 99) {
						echo"Complete Review";
					} else {
						echo"Episode $article->episode";
					}
				}
			
			echo"</h1>
					<div id=\"newswrapper\">
					<h2>$title</h2>
						<div id=\"newsbody\">
							<h3>Posted by: $article->poster @ $article->posted</h3>
							<p>$post</p><br><br></div>
						</div>
					</div>
				<div id=\"postfoot\"></div>";
				
		} else {	// Its either news or other	
	
			$title = htmlspecialchars($article->title);
			$post = nl2br($article->content);
			echo "
			<div id=\"post\">
				<h1>$article->class</h1>
				<div id=\"newswrapper\">
				<h2>$title</h2>
					<div id=\"newsbody\">
						<h3>Posted by: $article->poster @ $article->posted</h3>
						<p>$post</p><br><br></div>
					</div>
				</div>
			<div id=\"postfoot\"></div>";
		}
		
?>

<div id="footer"><p>&copy;2010 Kevin Baumgardner</p></div>			
		</div>
	
	</div>

</div>
</body>
</html>
